package demo.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Student implements Serializable {
    /**
     * 序列化
     */
    private static final long serialVersionUID = 1L;

    private String id;
    private String name;
    private Integer age;
    private Date date;
    private Double score;

    public Student() {
    }

    public Student(String id, String name, Integer age, Date date, Double score) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.date = date;
        this.score = score;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", date=" + new SimpleDateFormat("yyyy-MM-dd").format(date) +
                ", score=" + score +
                '}';
    }


}

